//
//  WoDeXiaoXiViewController.m
//  XiangMu
//
//  Created by  方崇豪 on 15/7/14.
//  Copyright (c) 2015年  方崇豪. All rights reserved.
//

#import "WoDeXiaoXiViewController.h"

@interface WoDeXiaoXiViewController ()

@end

@implementation WoDeXiaoXiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title=@"我的消息";
    
//    self.navigationController.navigationBarHidden=NO;
 
    UIButton*iamgeview=[UIButton buttonWithType:UIButtonTypeCustom];
     iamgeview.frame=CGRectMake(10, 0, 10, 20);
    [iamgeview setImage:[UIImage imageNamed:@"fanhui"] forState:UIControlStateNormal];
    
   [iamgeview addTarget:self action:@selector(btn) forControlEvents:UIControlEventTouchUpInside];

    UIBarButtonItem*bar=[[UIBarButtonItem alloc]initWithCustomView:iamgeview];
    
    self.navigationItem.leftBarButtonItem=bar;
    self.tabBarController.tabBar.hidden=YES;
    
    [self.tableView registerNib:[UINib nibWithNibName:@"WoDeXiaoXiTableViewCell" bundle:nil] forCellReuseIdentifier:@"xiaoxi"];
   

    
}
-(void)btn{
    [self.navigationController popViewControllerAnimated:YES];
    self.tabBarController.tabBar.hidden=NO;
}
- (IBAction)FanHuiBtn:(id)sender {
    
    
//    [self.navigationController popViewControllerAnimated:YES];
    
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    WoDeXiaoXiTableViewCell * cell =[tableView dequeueReusableCellWithIdentifier:@"xiaoxi" forIndexPath:indexPath];
    
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 70;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    XiaoXiXiangQingViewController * xiao = [[XiaoXiXiangQingViewController alloc]init];
    
    [self.navigationController pushViewController:xiao animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
